import concurrent.futures
import time

def print_message(message):
    print(f"开始执行任务: {message}")
    current_time = time.ctime()
    print(f"{message} 的时间是: {current_time}")

# 创建一个线程池
with concurrent.futures.ThreadPoolExecutor(max_workers=2) as executor:
    # 提交两个任务到线程池
    executor.submit(print_message, "任务1")
    executor.submit(print_message, "任务2")

print("所有任务执行完毕")
